package org.minbox.framework.microservice.openfeign;

import org.minbox.framework.microservice.common.entity.UserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 用户服务OpenFeign接口
 *
 * @author 恒宇少年
 */
@FeignClient(name = "user-service")
@RequestMapping(value = "/user")
public interface UserServiceClient {
    /**
     * 查询用户基本信息
     *
     * @param userId 用户编号{@link UserInfo#getId()}
     * @return {@link UserInfo}
     */
    @GetMapping(value = "/{userId}")
    UserInfo findById(@PathVariable Integer userId);
}
